<?php
	header('content-type:text/html;charset=utf-8');
	$string = file_get_contents("php://input");	
	$stringQty = strlen($string);
	if ($stringQty > 8){
		$str = unpack('C8', $string);  		
		if($str[3] == 0x1f && $str[4] == 0x8b){
			$start = 2;
		}else if($str[5] == 0x1f && $str[6] == 0x8b){
			$start = 4;
		}else{
			$start = 0;
		}		

		if($start > 0){
			$compressedString = substr($string, 2); // 2表示截取从第三位开始的字符串			
			$gztext = gzdecode($compressedString);	// gzdecode解压
			$text = urldecode($gztext);				//url编码
		}else{
			$text = $string;
		}	
	}else{
		$text = $string;
	}
	
	$arr = explode('&', $text);
	$length = sizeof($arr);	
	$left;
	$right;
	
	for($index=0;$index<$length;$index++){
		$key = explode(':', $arr[$index]);
		$left[$index] = $key[0];
		$right[$index] = $key[1];
	}
	
	if ($right[0] == 'sbul'){		// user.htm页面	user login	登录按钮onClick="login()"
		// t:sbul&name:1&psw:2&code:3&ivca:65502&host:Mozilla%2F5....
		// {"result":"ok"}
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA==
		$name = $right[1];
		$pswa = $right[2];
		$code = $right[3];
		$ivca = $right[4];
		$host = $right[5];		
		if ($name != "MQ=="){
			$result['result'] = 'name';
		}else if ($pswa != "c81e72"){
			$result['result'] = 'pswa';
		}else if ($code != "Mw=="){
			$result['result'] = 'code';
		}else if ($ivca != "65502"){
			$result['result'] = 'ivca';
		}else{
			$result['result'] = 'ok';
		}			
		//if ($name == 1 && $pswa == 2 && $code == 3 && $ivca == 65502){
		if ($name == "MQ==" && $pswa == "c81e72" && $code == "Mw==" && $ivca == 65502){
			setcookie("logt", "10090_1_abcd", time()+12300);
			//Set-Cookie: tk=1; expires=Sat, 08-Apr-2023 02:08:11 GMT; Max-Age=123
			//setcookie('cwillchris','will',time()+3600*24*7); //设置名称为 cwillchris 的 cookie 的值为will，有效时间为7天
		}
		echo json_encode($result);
	}else if ($right[0] == 'nivc'){		//  new image  图片验证码		图片验证码按钮
		// t:nivc&cnta:1
		// {"ivca":65501}
		$cnta = $right[1];
		$result['ivc'] = 65500+$cnta;
		echo json_encode($result);
	}else if ($right[0] == 'ncki'){		// 获取cookies验证
		// t:ncki
		$value = isset($_COOKIE['logt']) ? $_COOKIE['logt'] : null;
		//$value = isset($_COOKIE['cookie_name']) ? $_COOKIE['cookie_name'] : null;
		if($value == null){
			$result['result'] = 'error';
		}else{
			$result['result'] = 'ok';
		}		
		//$value = isset($_COOKIE['cookie_name']) ? $_COOKIE['cookie_name'] : null;
		//$result['result'] = $value;
		//$result['result'] = $right[1];	
		echo json_encode($result);
	}else if ($right[0] == 'sbml'){		// mobile.htm页面 mobile login		登录按钮onClick="login()"
		// t:sbml&tele:1&code:2&smsa:3&ivca:65502
		// {"result":"ok"}
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA==
		$tele = $right[1];
		$code = $right[2];
		$smsa = $right[3];
		$ivca = $right[4];			
		if ($tele != "MQ=="){
			$result['result'] = 'tele';
		}else if ($code != "Mg=="){
			$result['result'] = 'code';
		}else if ($smsa != "Mw=="){
			$result['result'] = 'smsa';
		}else if ($ivca != "65502"){
			$result['result'] = 'ivca';
		}else{
			$result['result'] = 'ok';
		}	
		echo json_encode($result);
	}else if ($right[0] == 'nsms'){		// mobile.htm页面	mobile send sms 获取短信按钮 id="sendMsg"
		// t:nsms&tele:1&code:2&ivca:65502
		// {"result":"ok"}
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA==
		$tele = $right[1];
		$code = $right[2];
		$ivca = $right[3];		
		if ($tele != "MQ=="){
			$result['result'] = 'tele';
		}else if ($code != "Mg=="){
			$result['result'] = 'code';
		}else if ($ivca != "65502"){
			$result['result'] = 'ivca';
		}else{
			$result['result'] = 'ok';
		}	
		echo json_encode($result);
	}else if ($right[0] == 'sbel'){		// email.htm页面	email login	登录按钮onClick="login()"
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA==
		$emai = $right[1];
		$code = $right[2];
		$emsa = $right[3];
		$ivca = $right[4];	
		if ($emai != "MQ=="){
			$result['result'] = 'emai';
		}else if ($code != "Mg=="){
			$result['result'] = 'code';
		}else if ($emsa != "Mw=="){
			$result['result'] = 'emsa';
		}else if ($ivca != "65502"){
			$result['result'] = 'ivca';
		}else{
			$result['result'] = 'ok';
		}
		//if ($emai == 1 && $code == 2 && $emsa == 3 && $ivca == 65502){
		if ($emai == "MQ==" && $code == "Mg==" && $emsa == "Mw==" && $ivca == 65502){			
			setcookie("tk", "10090_1_abcd", time()+123);
			//Set-Cookie: tk=1; expires=Sat, 08-Apr-2023 02:08:11 GMT; Max-Age=123
			//setcookie('cwillchris','will',time()+3600*24*7); //设置名称为 cwillchris 的 cookie 的值为will，有效时间为7天
		}
		echo json_encode($result);
	}else if ($right[0] == 'nems'){		// email.htm页面 获取邮箱验证码按钮 id="sendMsg"
		// t:nems&emai:1&code:2&ivca:65502
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA==
		$emai = $right[1];
		$code = $right[2];
		$ivca = $right[3];		
		if ($emai != "MQ=="){
			$result['result'] = 'emai';
		}else if ($code != "Mg=="){
			$result['result'] = 'code';
		}else if ($ivca != "65502"){
			$result['result'] = 'ivca';
		}else{
			$result['result'] = 'ok';
		}	
		echo json_encode($result);
	}else if ($right[0] == 'sbrl'){		// register.htm页面	register login	注册按钮onClick="login()"	
		// t:sbrl&pswa:1&acct:2&code:3&amsa:4&ivca:65502&kcid:223344556
		// {"result":"ok"}
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA==	1完整的密码 c4ca4238a0b923820dcc509a6f75849b
		$pswa = $right[1];
		$acct = $right[2];
		$code = $right[3];
		$amsa = $right[4];
		$ivca = $right[5];	
		$kcid = $right[6];		
		if ($pswa != "c4ca4238a0b923820dcc509a6f75849b"){
			$result['result'] = 'pswa';
		}else if ($acct != "Mg=="){
			$result['result'] = 'acct';
		}else if ($code != "Mw=="){
			$result['result'] = 'code';
		}else if ($amsa != "NA=="){
			$result['result'] = 'amsa';
		}else if ($ivca != "65502"){
			$result['result'] = 'ivca';
		}else{
			$result['result'] = 'ok';
		}	
		echo json_encode($result);
	}else if ($right[0] == 'nrms'){		// register.htm页面	register send amsa	获取短信按钮 id="sendMsg"	
		// t:nrms&pswa:1&tele:2&code:3&ivca:65502&kcid:223344556
		// {"result":"ok"}
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA==	1完整的密码 c4ca4238a0b923820dcc509a6f75849b
		$pswa = $right[1];
		$acct = $right[2];
		$code = $right[3];
		$ivca = $right[4];		
		$kcid = $right[5];	
		if ($pswa != "c4ca4238a0b923820dcc509a6f75849b"){
			$result['result'] = 'pswa';
		}else if ($acct != "Mg=="){
			$result['result'] = 'acct';
		}else if ($code != "Mw=="){
			$result['result'] = 'code';
		}else if ($ivca != "65502"){
			$result['result'] = 'ivca';
		}else{
			$result['result'] = 'ok';
		}			
		echo json_encode($result);
	}else if ($right[0] == 'naid'){		// register.htm页面	register sendkcid	获取新KCID id="sendkcid"	
		// t:naid
		// {"result":"ok"}
		$result['kcid'] = '223344556';
		$result['result'] = 'ok';
		echo json_encode($result);
	}else if ($right[0] == 'sbfc'){		// forgot.htm页面	forgot confirm	确定修改按钮onClick="confirm()"
		// t:sbfc&acct:1&code:2&amsa:3&pswa:4&ivca:65502
		// {"result":"ok"}
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA==	1完整的密码 c4ca4238a0b923820dcc509a6f75849b	4的MD5 a87ff679a2f3e71d9181a67b7542122c
		$acct = $right[1];
		$code = $right[2];
		$amsa = $right[3];
		$pswn = $right[4];
		$ivca = $right[5];		
		if ($acct != "MQ=="){
			$result['result'] = 'acct';
		}else if ($code != "Mg=="){
			$result['result'] = 'code';
		}else if ($amsa != "Mw=="){
			$result['result'] = 'amsa';
		}else if ($pswn != "a87ff679a2f3e71d9181a67b7542122c"){
			$result['result'] = 'pswn';
		}else if ($ivca != "65502"){
			$result['result'] = 'ivca';
		}else{
			$result['result'] = 'ok';
		}	
		echo json_encode($result);
	}else if ($right[0] == 'nams'){		// forgot.htm页面	forgot send sms	获取短信按钮 id="sendMsg"
		// t:nams&acct:1&code:2&ivca:65502
		// {"result":"ok"}
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA==	1完整的密码 c4ca4238a0b923820dcc509a6f75849b
		$acct = $right[1];
		$code = $right[2];
		$ivca = $right[3];
		if ($acct != "MQ=="){
			$result['result'] = 'acct';
		}else if ($code != "Mg=="){
			$result['result'] = 'code';
		}else if ($ivca != "65502"){
			$result['result'] = 'ivca';
		}else{
			$result['result'] = 'ok';
		}	
		echo json_encode($result);
	}else if ($right[0] == 'sbcr'){		// center.htm页面	center read
		// t:sbcr
		// {"acct":"ip71.aacn","nic":"\u5676\u662f","tel":"123456789x","email":"11111@qq.com","intro":"30\u8272,\u591a","birthday":"2023-1-1"}
		$dn['kcid'] = "ip71.aacn";
		$dn['nick'] = '噶是电噶是电噶是电噶是电噶是';
		$dn['tele'] = '123456789x';
		$dn['emai'] = '11111@qq.com';
		$dn['intr'] = '30色,多，噶啥会大富豪就华闪电发货发好地方阿斯顿法国啊1321sdgs';
		$dn['born'] = '2023-1-1';		
		$dn['uimg'] = 'img/user_head.jpg';		// $dn['intr'] = urlencode('30色,多，发');	// 是需要转码的
		echo json_encode($dn);
	}
	else if ($right[0] == 'upwt'){		// center.htm页面	(waiting)
		$file = '1';
		if ($file != "1"){
			$result['result'] = 'file';
		}else{
			$result['result'] = 'ok';
			$result['offh'] = '0';
			$result['offl'] = '0';
			$result['hdst'] = 'DgAAACVoAAACAQAAMAAAADAAAAABxwMAMDEyMzQ1Njc4OWFiY2RlZg';
			$result['bloc'] = '0';
			$result['assd'] = '0';	
		}	
		echo json_encode($result);		
	}
	else if ($right[0] == 'upcf'){		// center.htm页面	(checkFile)
		$file = '1';
		if ($file != "1"){
			$result['result'] = 'file';
		}else{
			/*			
			$result['optt'] = $right[1];
			$result['kcid'] = $right[2];
			$result['fida'] = $right[3];
			$result['aux1'] = $right[4];			
			$result['aux2'] = $right[5];
			$result['size'] = $right[6];
			$result['mtim'] = $right[7];			
			$result['md5a'] = $right[8];
			$result['auxa'] = $right[9];
			*/
			$result['result'] = 'ok';
			$result['offh'] = '0';
			$result['offl'] = '0';
			$result['hdst'] = 'DgAAACVoAAACAQAAMAAAADAAAAABxwMAMDEyMzQ1Njc4OWFiY2RlZg';
			$result['bloc'] = '0';
			$result['assd'] = '0';	
		}	
		echo json_encode($result);		
	}
	else if ($right[0] == 'upcs'){		// center.htm页面	(checkStep)
		$file = '1';
		if ($file != "1"){
			$result['result'] = 'file';
		}else{
			$result['result'] = 'ok';
			$result['offh'] = '0';
			$result['offl'] = '0';
			$result['hdst'] = 'DgAAACVoAAACAQAAMAAAADAAAAABxwMAMDEyMzQ1Njc4OWFiY2RlZg';
			$result['bloc'] = '0';
			$result['assd'] = '0';	
		}	
		echo json_encode($result);		
	}
	else if ($right[0] == 'upch'){		// center.htm页面	上传完成(checkFinish)
		$file = '1';
		if ($file != "1"){
			$result['result'] = 'file';
		}else{
			$result['result'] = 'ok';
			$result['offh'] = '0';
			$result['offl'] = '0';
			$result['hdst'] = 'DgAAACVoAAACAQAAMAAAADAAAAABxwMAMDEyMzQ1Njc4OWFiY2RlZg';
			$result['bloc'] = '0';
			$result['assd'] = '0';	
		}	
		echo json_encode($result);		
	}
	else if ($right[0] == 'sbds'){		// dninfo.htm页面	search 
		// t:sbds&searchId:111
		// [{"searchdn":"ip71","searchst":"\u6b63\u5e38","searchpri":"10"},
		//{"searchdn":"ip72","searchst":"\u6b63\u5e38","searchpri":"20"},
		//{"searchdn":"ip73","searchst":"\u6b63\u5e38","searchpri":"30"}]
		
		$searchId = $right[1];
		$dn0['name'] = 'ip71';
		$dn0['stat'] = '0';
		$dn0['pric'] = '10';
		//$dn0['opns'] = '立即注册';
		
		$dn1['name'] = 'ip72';
		$dn1['stat'] = '1';
		$dn1['pric'] = '20';
		//$dn1['opns'] = '立即注册';
		
		$dn2['name'] = 'ip73';
		$dn2['stat'] = '1';
		$dn2['pric'] = '30';
		//$dn2['opns'] = '已被注册';
		
		$dn3['name'] = 'ip74';
		$dn3['stat'] = '0';
		$dn3['pric'] = '40';
		//$dn3['opns'] = '立即注册';
		
		$dn4['name'] = 'ip75';
		$dn4['stat'] = '0';
		$dn4['pric'] = '50';
		//$dn4['opns'] = '已被注册';
		
		$dn5['name'] = 'ip76';
		$dn5['stat'] = '1';
		$dn5['pric'] = '60';
		//$dn5['opns'] = '立即注册';
		$result = array($dn0,$dn1,$dn2,$dn3,$dn4,$dn5);
		echo json_encode($result);
	}
	else if ($right[0] == 'sbdd'){		// dninfo.htm页面	 删除域名
		$result['result'] = 'ok';
		echo json_encode($result);
	}
	else if ($right[0] == 'sbdi'){		// dninfo.htm页面		domain name info	
		// t:sbdi
		// [{"name":"aaa.ip71,cn","stat":"\u6b63\u5e38","cday":"1999-1-1","term":"2000-1-2"},{"name":"aaa.ip72,cn",
		//"stat":"\u6b63\u5e38","cday":"1999-1-3","term":"2000-1-4"},{"name":"aaa.ip73,cn","stat":"\u6b63\u5e38","cday":"1999-1-5","term":"2000-1-6"}]
		
		$dn0['name'] = 'aaaAAAAAAAAAAAAAAAA.ip71.cn';
		$dn0['stat'] = '正常';
		$dn0['ipv4'] = '192.168.100.188';
		$dn0['dayh'] = '2023-11-10';
		$dn0['pswa'] = '123456';
		$dn0['visi'] = '778899';
		$dn0['cday'] = '1999-1-1';
		$dn0['term'] = '2000-1-2';
		//$dn0['doct'] = '续费';
		//$dn0['modi'] = '修改';
		//$dn0['dele'] = '删除';
		
		$dn1['name'] = 'aaa.ip72.cn';
		$dn1['stat'] = '过期';
		$dn1['ipv4'] = '192.168.0.11';
		$dn1['dayh'] = '2023-11-9';
		$dn1['pswa'] = '654321';
		$dn1['visi'] = '112233';
		$dn1['cday'] = '2022-6-10';
		$dn1['term'] = '2023-6-10';
		//$dn1['doct'] = '续费';
		//$dn1['modi'] = '修改';
		//$dn1['dele'] = '删除';		
		
		$dn2['name'] = 'aaa.ip73.cn';
		$dn2['stat'] = '正常';
		$dn2['ipv4'] = '192.168.0.22';
		$dn2['dayh'] = '2023-11-8';
		$dn2['pswa'] = '567891';
		$dn2['visi'] = '556688';
		$dn2['cday'] = '1999-1-5';
		$dn2['term'] = '2000-1-6';
		//$dn2['doct'] = '续费';
		//$dn2['modi'] = '修改';
		//$dn2['dele'] = '删除';
		
		$result = array($dn0,$dn1,$dn2,$dn1,$dn2);
		echo json_encode($result);
	}else if ($right[0] == 'sbdp'){		// dnpay.htm页面	确定购买 按钮onClick="confirm()"
		// t:sbdp&name:ip71&selecttime:1&paidprice:10
		// {"result":"ok"}
		$name= $right[1];
		$time= $right[2];
		$pric= $right[3];		
		$result['result'] = 'ok';
		echo json_encode($result);
	}else if ($right[0] == 'sbcp'){		// expansion.htm页面	确定购买 按钮onClick="confirm()"
		// t:sbdp&name:ip71&selecttime:1&paidprice:10
		// {"result":"ok"}
		$room= $right[1];
		$time= $right[2];
		$pric= $right[3];		
		$result['result'] = 'ok';
		echo json_encode($result);
	}
	else if ($right[0] == 'ampl'){		// modifypsw.htm页面	确定修改密码 按钮onClick="confirm()"
		// t:ampl&pswa:1&pswn:2
		// {"result":"ok"}
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA==	1完整MD5 c4ca4238a0b923820dcc509a6f75849b 2完整MD5 c81e728d9d4c2f636f067f89cc14862c
		$pswa= $right[1];
		$pswn= $right[2];
		
		if ($pswa != "c4ca4238a0b923820dcc509a6f75849b"){
			$result['result'] = 'pswa';
		}else if ($pswn != "c81e728d9d4c2f636f067f89cc14862c"){
			$result['result'] = $pswn;//'pswn';
		}else{
			$result['result'] = 'ok';
		}	
		
		echo json_encode($result);
	}else if ($right[0] == 'umna'){		// modifyname.htm页面	确定修改昵称 按钮onClick="confirm()"
		// t:umna&nick:1
		// {"result":"ok"}
		//1 MQ==
		$nick= $right[1];
		if ($nick != "MQ=="){
			$result['result'] = "nick";
		}else{
			$result['result'] = 'ok';
		}	
		echo json_encode($result);
	}else if ($right[0] == 'umin'){		// modifyintro.htm页面	确定修改介绍 按钮onClick="confirm()"
		// t:mi&intr:1
		// {"result":"ok"}
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA=
		$intr= $right[1];
		if ($intr != "MQ=="){
			$result['result'] = 'intr';
		}else{
			$result['result'] = 'ok';
		}	
		echo json_encode($result);
	}else if ($right[0] == 'nemm'){		// modifyemail.htm页面 	发送邮箱验证码 按钮onClick="sendEmail()"
		// t:nemm&emai:1&code:2&ivca:65502
		// {"result":"ok"}
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA==
		$emai = $right[1];
		$code = $right[2];
		$ivca = $right[3];
		if ($emai != "MQ=="){
			$result['result'] = 'emai';
		}else if ($code != "Mg=="){
			$result['result'] = 'code';
		}else if ($ivca != "65502"){
			$result['result'] = 'ivca';
		}else{
			$result['result'] = 'ok';
		}	
		echo json_encode($result);
	}else if ($right[0] == 'amem'){		// modifyemail.htm页面 	确定修改邮箱 按钮onClick="confirm()"
		// t:amem&emai:1&code:2&emsa:3&ivca:65502
		// {"result":"ok"}
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA==
		$emai = $right[1];
		$code = $right[2];
		$emsa = $right[3];
		$ivca = $right[4];		
		if ($emai != "MQ=="){
			$result['result'] = 'emai';
		}else if ($code != "Mg=="){
			$result['result'] = 'code';
		}else if ($emsa != "Mw=="){
			$result['result'] = 'emsa';
		}else if ($ivca != "65502"){
			$result['result'] = 'ivca';
		}else{
			$result['result'] = 'ok';
		}	
		echo json_encode($result);
	}else if ($right[0] == 'nsmm'){		// modifytel.htm页面 	获取验证信息 按钮onClick="sendMsg()"
		// t:nsmm&tele:1&code:2&ivca:65502
		// {"result":"ok"}
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA==
		$tele = $right[1];
		$code = $right[2];
		$ivca = $right[3];
		if ($tele != "MQ=="){
			$result['result'] = 'tele';
		}else if ($code != "Mg=="){
			$result['result'] = 'code';
		}else if ($ivca != "65502"){
			$result['result'] = 'ivca';
		}else{
			$result['result'] = 'ok';
		}	
		echo json_encode($result);
	}else if ($right[0] == 'amph'){		// modifytel.htm页面 	修改确认 按钮onClick="confirm()"
		// t:amph&tele:1&code:2&smsa:3&ivca:65502
		// {"result":"ok"}
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA==
		$tele = $right[1];
		$code = $right[2];
		$smsa = $right[3];
		$ivca = $right[4];
		if ($tele != "MQ=="){
			$result['result'] = 'tele';
		}else if ($code != "Mg=="){
			$result['result'] = 'code';
		}else if ($smsa != "Mw=="){
			$result['result'] = 'smsa';
		}else if ($ivca != "65502"){
			$result['result'] = 'ivca';
		}else{
			$result['result'] = 'ok';
		}	
		echo json_encode($result);
	}else if ($right[0] == 'umbd'){		// modifybirthday.htm页面 	修改日期 按钮onClick="confirm()"
		// t:umbd&year:2007&mont:1&daya:1
		// {"result":"ok"}
		$year = $right[1];
		$mont = $right[2];
		$daya = $right[3];
		$result['result'] = 'ok';
		echo json_encode($result);
	}
	else if ($right[0] == 'umdn'){		// modifydndata.htm页面		修改域名信息 按钮onClick="confirm()"
		// t:umdn&pswa:1&code:2&name:aaa.ip72.c
		// {"result":"ok"}		
		$pswa= $right[1];
		$visi= $right[2];
		if ($pswa != "1"){
			$result['result'] = 'pswa';
		}else if($visi != "2"){
			$result['result'] = 'visi';
		}else{
			$result['result'] = 'ok';
		}	
		echo json_encode($result);
	}else if ($right[0] == 'sbsp'){		// 读取空间大小
		$sp['used'] = '1234M';
		$sp['tota'] = '100G';
		echo json_encode($sp);
	}
	else if ($right[0] == 'sblk'){		// filelist.htm 页面 创建文件链接
		$result['code'] = $right[1];
		$result['time'] = $right[2];
		$result['link'] = 'http://hsav.com/';		
		$result['result'] = 'ok';
		echo json_encode($result);
	}
	else{
		$result['000'] = $left[0];
		$result['001'] = $right[0];
		if ($length > 1){
			$result['002'] = $left[1];
			$result['003'] = $right[1];
		}
		echo json_encode($result);
	}
	
	else if ($right[0] == 'amad'){		// modifyaddress.htm页面	确定修改地址 按钮onClick="confirm()"
    // t:amad&addr:1
    // {"result":"ok"}
    $addr = $right[1];
    if ($addr != "MQ=="){
        $result['result'] = "addr";
    }else{
        $result['result'] = 'ok';
    }	
    echo json_encode($result);
}
	else if ($right[0] == 'sbrl'){		// register.htm页面	register login	注册按钮onClick="login()"	
		// t:sbrl&pswa:1&acct:2&code:3&amsa:4&ivca:65502&kcid:223344556
		// {"result":"ok"}
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA==	1完整的密码 c4ca4238a0b923820dcc509a6f75849b
		$pswa = $right[1];
		$acct = $right[2];
		$code = $right[3];
		$amsa = $right[4];
		$ivca = $right[5];	
		$kcid = $right[6];		
		if ($pswa != "c4ca4238a0b923820dcc509a6f75849b"){
			$result['result'] = 'pswa';
		}else if ($acct != "Mg=="){
			$result['result'] = 'acct';
		}else if ($code != "Mw=="){
			$result['result'] = 'code';
		}else if ($amsa != "NA=="){
			$result['result'] = 'amsa';
		}else if ($ivca != "65502"){
			$result['result'] = 'ivca';
		}else{
			$result['result'] = 'ok';
		}	
		echo json_encode($result);
	}else if ($right[0] == 'nrms'){		// register.htm页面	register send amsa	获取短信按钮 id="sendMsg"	
		// t:nrms&pswa:1&tele:2&code:3&ivca:65502&kcid:223344556
		// {"result":"ok"}
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA==	1完整的密码 c4ca4238a0b923820dcc509a6f75849b
		$pswa = $right[1];
		$acct = $right[2];
		$code = $right[3];
		$ivca = $right[4];		
		$kcid = $right[5];	
		if ($pswa != "c4ca4238a0b923820dcc509a6f75849b"){
			$result['result'] = 'pswa';
		}else if ($acct != "Mg=="){
			$result['result'] = 'acct';
		}else if ($code != "Mw=="){
			$result['result'] = 'code';
		}else if ($ivca != "65502"){
			$result['result'] = 'ivca';
		}else{
			$result['result'] = 'ok';
		}			
		echo json_encode($result);
	}else if ($right[0] == 'naid'){		// register.htm页面	register sendkcid	获取新KCID id="sendkcid"	
		// t:naid
		// {"result":"ok"}
		$result['kcid'] = '223344556';
		$result['result'] = 'ok';
		echo json_encode($result);
	}else if ($right[0] == 'sbfc'){		// forgot.htm页面	forgot confirm	确定修改按钮onClick="confirm()"
		// t:sbfc&acct:1&code:2&amsa:3&pswa:4&ivca:65502
		// {"result":"ok"}
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA==	1完整的密码 c4ca4238a0b923820dcc509a6f75849b	4的MD5 a87ff679a2f3e71d9181a67b7542122c
		$acct = $right[1];
		$code = $right[2];
		$amsa = $right[3];
		$pswn = $right[4];
		$ivca = $right[5];		
		if ($acct != "MQ=="){
			$result['result'] = 'acct';
		}else if ($code != "Mg=="){
			$result['result'] = 'code';
		}else if ($amsa != "Mw=="){
			$result['result'] = 'amsa';
		}else if ($pswn != "a87ff679a2f3e71d9181a67b7542122c"){
			$result['result'] = 'pswn';
		}else if ($ivca != "65502"){
			$result['result'] = 'ivca';
		}else{
			$result['result'] = 'ok';
		}	
		echo json_encode($result);
	}else if ($right[0] == 'nams'){		// forgot.htm页面	forgot send sms	获取短信按钮 id="sendMsg"
		// t:nams&acct:1&code:2&ivca:65502
		// {"result":"ok"}
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA==	1完整的密码 c4ca4238a0b923820dcc509a6f75849b
		$acct = $right[1];
		$code = $right[2];
		$ivca = $right[3];
		if ($acct != "MQ=="){
			$result['result'] = 'acct';
		}else if ($code != "Mg=="){
			$result['result'] = 'code';
		}else if ($ivca != "65502"){
			$result['result'] = 'ivca';
		}else{
			$result['result'] = 'ok';
		}	
		echo json_encode($result);
	}else if ($right[0] == 'sbcr'){		// center.htm页面	center read
		// t:sbcr
		// {"acct":"ip71.aacn","nic":"\u5676\u662f","tel":"123456789x","email":"11111@qq.com","intro":"30\u8272,\u591a","birthday":"2023-1-1"}
		$dn['kcid'] = "ip71.aacn";
		$dn['nick'] = '噶是电噶是电噶是电噶是电噶是';
		$dn['tele'] = '123456789x';
		$dn['emai'] = '11111@qq.com';
		$dn['intr'] = '30色,多，噶啥会大富豪就华闪电发货发好地方阿斯顿法国啊1321sdgs';
		$dn['born'] = '2023-1-1';		
		$dn['uimg'] = 'img/user_head.jpg';		// $dn['intr'] = urlencode('30色,多，发');	// 是需要转码的
		echo json_encode($dn);
	}
	else if ($right[0] == 'upwt'){		// center.htm页面	(waiting)
		$file = '1';
		if ($file != "1"){
			$result['result'] = 'file';
		}else{
			$result['result'] = 'ok';
			$result['offh'] = '0';
			$result['offl'] = '0';
			$result['hdst'] = 'DgAAACVoAAACAQAAMAAAADAAAAABxwMAMDEyMzQ1Njc4OWFiY2RlZg';
			$result['bloc'] = '0';
			$result['assd'] = '0';	
		}	
		echo json_encode($result);		
	}
	else if ($right[0] == 'upcf'){		// center.htm页面	(checkFile)
		$file = '1';
		if ($file != "1"){
			$result['result'] = 'file';
		}else{
			/*			
			$result['optt'] = $right[1];
			$result['kcid'] = $right[2];
			$result['fida'] = $right[3];
			$result['aux1'] = $right[4];			
			$result['aux2'] = $right[5];
			$result['size'] = $right[6];
			$result['mtim'] = $right[7];			
			$result['md5a'] = $right[8];
			$result['auxa'] = $right[9];
			*/
			$result['result'] = 'ok';
			$result['offh'] = '0';
			$result['offl'] = '0';
			$result['hdst'] = 'DgAAACVoAAACAQAAMAAAADAAAAABxwMAMDEyMzQ1Njc4OWFiY2RlZg';
			$result['bloc'] = '0';
			$result['assd'] = '0';	
		}	
		echo json_encode($result);		
	}
	else if ($right[0] == 'upcs'){		// center.htm页面	(checkStep)
		$file = '1';
		if ($file != "1"){
			$result['result'] = 'file';
		}else{
			$result['result'] = 'ok';
			$result['offh'] = '0';
			$result['offl'] = '0';
			$result['hdst'] = 'DgAAACVoAAACAQAAMAAAADAAAAABxwMAMDEyMzQ1Njc4OWFiY2RlZg';
			$result['bloc'] = '0';
			$result['assd'] = '0';	
		}	
		echo json_encode($result);		
	}
	else if ($right[0] == 'upch'){		// center.htm页面	上传完成(checkFinish)
		$file = '1';
		if ($file != "1"){
			$result['result'] = 'file';
		}else{
			$result['result'] = 'ok';
			$result['offh'] = '0';
			$result['offl'] = '0';
			$result['hdst'] = 'DgAAACVoAAACAQAAMAAAADAAAAABxwMAMDEyMzQ1Njc4OWFiY2RlZg';
			$result['bloc'] = '0';
			$result['assd'] = '0';	
		}	
		echo json_encode($result);		
	}
	else if ($right[0] == 'sbds'){		// dninfo.htm页面	search 
		// t:sbds&searchId:111
		// [{"searchdn":"ip71","searchst":"\u6b63\u5e38","searchpri":"10"},
		//{"searchdn":"ip72","searchst":"\u6b63\u5e38","searchpri":"20"},
		//{"searchdn":"ip73","searchst":"\u6b63\u5e38","searchpri":"30"}]
		
		$searchId = $right[1];
		$dn0['name'] = 'ip71';
		$dn0['stat'] = '0';
		$dn0['pric'] = '10';
		//$dn0['opns'] = '立即注册';
		
		$dn1['name'] = 'ip72';
		$dn1['stat'] = '1';
		$dn1['pric'] = '20';
		//$dn1['opns'] = '立即注册';
		
		$dn2['name'] = 'ip73';
		$dn2['stat'] = '1';
		$dn2['pric'] = '30';
		//$dn2['opns'] = '已被注册';
		
		$dn3['name'] = 'ip74';
		$dn3['stat'] = '0';
		$dn3['pric'] = '40';
		//$dn3['opns'] = '立即注册';
		
		$dn4['name'] = 'ip75';
		$dn4['stat'] = '0';
		$dn4['pric'] = '50';
		//$dn4['opns'] = '已被注册';
		
		$dn5['name'] = 'ip76';
		$dn5['stat'] = '1';
		$dn5['pric'] = '60';
		//$dn5['opns'] = '立即注册';
		$result = array($dn0,$dn1,$dn2,$dn3,$dn4,$dn5);
		echo json_encode($result);
	}
	else if ($right[0] == 'sbdd'){		// dninfo.htm页面	 删除域名
		$result['result'] = 'ok';
		echo json_encode($result);
	}
	else if ($right[0] == 'sbdi'){		// dninfo.htm页面		domain name info	
		// t:sbdi
		// [{"name":"aaa.ip71,cn","stat":"\u6b63\u5e38","cday":"1999-1-1","term":"2000-1-2"},{"name":"aaa.ip72,cn",
		//"stat":"\u6b63\u5e38","cday":"1999-1-3","term":"2000-1-4"},{"name":"aaa.ip73,cn","stat":"\u6b63\u5e38","cday":"1999-1-5","term":"2000-1-6"}]
		
		$dn0['name'] = 'aaaAAAAAAAAAAAAAAAA.ip71.cn';
		$dn0['stat'] = '正常';
		$dn0['ipv4'] = '192.168.100.188';
		$dn0['dayh'] = '2023-11-10';
		$dn0['pswa'] = '123456';
		$dn0['visi'] = '778899';
		$dn0['cday'] = '1999-1-1';
		$dn0['term'] = '2000-1-2';
		//$dn0['doct'] = '续费';
		//$dn0['modi'] = '修改';
		//$dn0['dele'] = '删除';
		
		$dn1['name'] = 'aaa.ip72.cn';
		$dn1['stat'] = '过期';
		$dn1['ipv4'] = '192.168.0.11';
		$dn1['dayh'] = '2023-11-9';
		$dn1['pswa'] = '654321';
		$dn1['visi'] = '112233';
		$dn1['cday'] = '2022-6-10';
		$dn1['term'] = '2023-6-10';
		//$dn1['doct'] = '续费';
		//$dn1['modi'] = '修改';
		//$dn1['dele'] = '删除';		
		
		$dn2['name'] = 'aaa.ip73.cn';
		$dn2['stat'] = '正常';
		$dn2['ipv4'] = '192.168.0.22';
		$dn2['dayh'] = '2023-11-8';
		$dn2['pswa'] = '567891';
		$dn2['visi'] = '556688';
		$dn2['cday'] = '1999-1-5';
		$dn2['term'] = '2000-1-6';
		//$dn2['doct'] = '续费';
		//$dn2['modi'] = '修改';
		//$dn2['dele'] = '删除';
		
		$result = array($dn0,$dn1,$dn2,$dn1,$dn2);
		echo json_encode($result);
	}else if ($right[0] == 'sbdp'){		// dnpay.htm页面	确定购买 按钮onClick="confirm()"
		// t:sbdp&name:ip71&selecttime:1&paidprice:10
		// {"result":"ok"}
		$name= $right[1];
		$time= $right[2];
		$pric= $right[3];		
		$result['result'] = 'ok';
		echo json_encode($result);
	}else if ($right[0] == 'sbcp'){		// expansion.htm页面	确定购买 按钮onClick="confirm()"
		// t:sbdp&name:ip71&selecttime:1&paidprice:10
		// {"result":"ok"}
		$room= $right[1];
		$time= $right[2];
		$pric= $right[3];		
		$result['result'] = 'ok';
		echo json_encode($result);
	}
	else if ($right[0] == 'ampl'){		// modifypsw.htm页面	确定修改密码 按钮onClick="confirm()"
		// t:ampl&pswa:1&pswn:2
		// {"result":"ok"}
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA==	1完整MD5 c4ca4238a0b923820dcc509a6f75849b 2完整MD5 c81e728d9d4c2f636f067f89cc14862c
		$pswa= $right[1];
		$pswn= $right[2];
		
		if ($pswa != "c4ca4238a0b923820dcc509a6f75849b"){
			$result['result'] = 'pswa';
		}else if ($pswn != "c81e728d9d4c2f636f067f89cc14862c"){
			$result['result'] = $pswn;//'pswn';
		}else{
			$result['result'] = 'ok';
		}	
		
		echo json_encode($result);
	}else if ($right[0] == 'umna'){		// modifyname.htm页面	确定修改昵称 按钮onClick="confirm()"
		// t:umna&nick:1
		// {"result":"ok"}
		//1 MQ==
		$nick= $right[1];
		if ($nick != "MQ=="){
			$result['result'] = "nick";
		}else{
			$result['result'] = 'ok';
		}	
		echo json_encode($result);
	}else if ($right[0] == 'umin'){		// modifyintro.htm页面	确定修改介绍 按钮onClick="confirm()"
		// t:mi&intr:1
		// {"result":"ok"}
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA=
		$intr= $right[1];
		if ($intr != "MQ=="){
			$result['result'] = 'intr';
		}else{
			$result['result'] = 'ok';
		}	
		echo json_encode($result);
	}else if ($right[0] == 'nemm'){		// modifyemail.htm页面 	发送邮箱验证码 按钮onClick="sendEmail()"
		// t:nemm&emai:1&code:2&ivca:65502
		// {"result":"ok"}
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA==
		$emai = $right[1];
		$code = $right[2];
		$ivca = $right[3];
		if ($emai != "MQ=="){
			$result['result'] = 'emai';
		}else if ($code != "Mg=="){
			$result['result'] = 'code';
		}else if ($ivca != "65502"){
			$result['result'] = 'ivca';
		}else{
			$result['result'] = 'ok';
		}	
		echo json_encode($result);
	}else if ($right[0] == 'amem'){		// modifyemail.htm页面 	确定修改邮箱 按钮onClick="confirm()"
		// t:amem&emai:1&code:2&emsa:3&ivca:65502
		// {"result":"ok"}
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA==
		$emai = $right[1];
		$code = $right[2];
		$emsa = $right[3];
		$ivca = $right[4];		
		if ($emai != "MQ=="){
			$result['result'] = 'emai';
		}else if ($code != "Mg=="){
			$result['result'] = 'code';
		}else if ($emsa != "Mw=="){
			$result['result'] = 'emsa';
		}else if ($ivca != "65502"){
			$result['result'] = 'ivca';
		}else{
			$result['result'] = 'ok';
		}	
		echo json_encode($result);
	}else if ($right[0] == 'nsmm'){		// modifytel.htm页面 	获取验证信息 按钮onClick="sendMsg()"
		// t:nsmm&tele:1&code:2&ivca:65502
		// {"result":"ok"}
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA==
		$tele = $right[1];
		$code = $right[2];
		$ivca = $right[3];
		if ($tele != "MQ=="){
			$result['result'] = 'tele';
		}else if ($code != "Mg=="){
			$result['result'] = 'code';
		}else if ($ivca != "65502"){
			$result['result'] = 'ivca';
		}else{
			$result['result'] = 'ok';
		}	
		echo json_encode($result);
	}else if ($right[0] == 'amph'){		// modifytel.htm页面 	修改确认 按钮onClick="confirm()"
		// t:amph&tele:1&code:2&smsa:3&ivca:65502
		// {"result":"ok"}
		//1 MQ==	2 Mg==(密码MD5 c81e72)	3 Mw==	4 NA==
		$tele = $right[1];
		$code = $right[2];
		$smsa = $right[3];
		$ivca = $right[4];
		if ($tele != "MQ=="){
			$result['result'] = 'tele';
		}else if ($code != "Mg=="){
			$result['result'] = 'code';
		}else if ($smsa != "Mw=="){
			$result['result'] = 'smsa';
		}else if ($ivca != "65502"){
			$result['result'] = 'ivca';
		}else{
			$result['result'] = 'ok';
		}	
		echo json_encode($result);
	}else if ($right[0] == 'umbd'){		// modifybirthday.htm页面 	修改日期 按钮onClick="confirm()"
		// t:umbd&year:2007&mont:1&daya:1
		// {"result":"ok"}
		$year = $right[1];
		$mont = $right[2];
		$daya = $right[3];
		$result['result'] = 'ok';
		echo json_encode($result);
	}
	else if ($right[0] == 'umdn'){		// modifydndata.htm页面		修改域名信息 按钮onClick="confirm()"
		// t:umdn&pswa:1&code:2&name:aaa.ip72.c
		// {"result":"ok"}		
		$pswa= $right[1];
		$visi= $right[2];
		if ($pswa != "1"){
			$result['result'] = 'pswa';
		}else if($visi != "2"){
			$result['result'] = 'visi';
		}else{
			$result['result'] = 'ok';
		}	
		echo json_encode($result);
	}else if ($right[0] == 'sbsp'){		// 读取空间大小
		$sp['used'] = '1234M';
		$sp['tota'] = '100G';
		echo json_encode($sp);
	}
	else if ($right[0] == 'sblk'){		// filelist.htm 页面 创建文件链接
		$result['code'] = $right[1];
		$result['time'] = $right[2];
		$result['link'] = 'http://hsav.com/';		
		$result['result'] = 'ok';
		echo json_encode($result);
	}
	else{
		$result['000'] = $left[0];
		$result['001'] = $right[0];
		if ($length > 1){
			$result['002'] = $left[1];
			$result['003'] = $right[1];
		}
		echo json_encode($result);
	}
	
	
		
?>